
package entity.establishment;

import entity.establishment.OutletFood;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

@Entity
public class StakeholderFood extends Stakeholder implements Serializable {
    @OneToMany (cascade={CascadeType.PERSIST})
    private List<OutletFood> outlets = new ArrayList<OutletFood>();

    public List<OutletFood> getOutlets() {
        return outlets;
    }

    public void setOutlets(List outlet) {
        this.outlets = outlet;
    }
    
    public void addOutlet(OutletFood outlet){
        this.outlets.add(outlet);
    }

}
